home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 10 / PC Guia 10.iso / database / shared.dir / 01005_Script_1005 < prev    next >
Text File  |  1996-03-14  |  14KB  |  443 lines

  1. on GoPictArticle
  2.   global gChapters, gTitles, gArticles, gDates, gCaptions, gCurCutting
  3.   global gCurChap, gCurArticle, gName, mytext, gArticlePage, gFullCuttings
  4.   global gFormattedText, gTextPages, gMaxLines, gCurIndex, gWorld, gSeenMaps
  5.   global gPaperLoch, gMakerName, gHeadlocH, gNameLoch, gNameLocv
  6.   global gMakerNum, gQTpath, gSoundPath, gNuggetTime, gNuggetDelay, gNameCastnum
  7.   global gCurPic
  8.   
  9.   set picsprite = 9  -- the sprite the pict appears on
  10.   set cuttingsprite = 6
  11.   set titlesprite = 8
  12.   set papersprite = 11
  13.   set datesprite = 12
  14.   set captionsprite = 7
  15.   set forwardbutton = 20
  16.   set backbutton = 19
  17.   set headsprite = 10  
  18.   set namesprite = 4
  19.   set headloch = gHeadloch  -- the loch of the headshot sprite
  20.   set the loch of sprite headsprite = headloch
  21.   
  22.   
  23.   -- PICT
  24.   puppetsprite forwardbutton,0
  25.   puppetsprite backbutton,0
  26.   puppetsprite papersprite,0
  27.   
  28.   set oldframelabel = the framelabel
  29.   
  30.   set the text of field "caption-pic" = " "
  31.   set the text of field "caption-pic2" = " "  
  32.   
  33.   if not (the framelabel contains "pic") then
  34.     unpuppet "4,10"     
  35.   else
  36.     puppetsprite captionsprite,0 -- unpuppet the pict caption    
  37.   end if
  38.   
  39.   -- get the castnumber of the picture
  40.   set piccastname = (gMakerNum & "-" & gCurChap & "." & gCurArticle)
  41.   set piccast = the number of cast piccastname
  42.   put (gMakerNum & "-" & gCurChap & "." & gCurArticle)
  43.   
  44.   if value(gMakerNum) = 119 then   -- special case for Matisse
  45.     set PictFrame = "pict.MAT"
  46.     set PictFrame2 = "pict2.MAT"
  47.   else
  48.     set PictFrame = "pict"
  49.     set PictFrame2 = "pict2"
  50.   end if
  51.   
  52.   if piccastname = "96-3.6" then
  53.     -- this is a special case for Jung
  54.     go to frame "pict2"
  55.   else if (gWorld = "design" or gWorld = "senses" or gWorld = "mind") and piccast > 0 then    
  56.     if the width of cast piccast >= the height of cast piccast then        
  57.       go to frame PictFrame2
  58.     else
  59.       go to frame PictFrame
  60.     end if
  61.   else
  62.     go to frame PictFrame
  63.   end if
  64.   
  65.   
  66.   CleanMem
  67.   set gCurPic = piccast -- remember the pict to unload later on
  68.   
  69.   if gWorld = "Senses" or gWorld = "Design" then
  70.     set the loch of sprite namesprite = gNameLoch
  71.     set the locv of sprite namesprite = gNameLocv
  72.   end if
  73.   
  74.   
  75.   -- move caption and pict offscreen
  76.   puppetsprite captionsprite,1 
  77.   set captionloch = the loch of sprite captionsprite
  78.   set the loch of sprite captionsprite = 1000  
  79.   puppetsprite picsprite,1
  80.   set the loch of sprite picsprite = 1000
  81.   updatestage
  82.   
  83.   if (gWorld = "senses" or gWorld = "Design") and (the framelabel = PictFrame2) then
  84.     set the castnum of sprite captionsprite = the number of cast "caption-pic2"
  85.   else
  86.     set the castnum of sprite captionsprite = the number of cast "caption-pic"
  87.   end if
  88.   
  89.   set tmpcap = GetCaption()
  90.   
  91.   if (gWorld = "senses" or gWorld = "design") and the framelabel = PictFrame2 then
  92.     set the text of field "caption-pic2" = tmpcap 
  93.     set the textheight of field "caption-pic2" = 18 
  94.   else  
  95.     set the text of field "caption-pic" = tmpcap
  96.   end if
  97.   
  98.   set the textheight of field "caption-pic" = 18  -- leading
  99.   
  100.   if gWorld = "Senses" then
  101.     set the textheight of field "caption-pic2" = 25
  102.   end if
  103.   
  104.   set the text of field "cutting" = " "
  105.   set the text of field "title" = " "
  106.   
  107.   -- adjust the height of the Pict caption, to center it
  108.   if gWorld = "Power" then
  109.     set centerpoint = 265      
  110.   else if gWorld = "senses" then
  111.     set centerpoint = 275
  112.   else if gWorld = "discover" then
  113.     set centerpoint = 250
  114.   else
  115.     set centerpoint = 300
  116.   end if
  117.   
  118.   if gWorld <> "Senses" and gWorld <> "Body" then
  119.     set caph = the height of cast "caption-pic"
  120.     if gWorld = "Design" then 
  121.       if the framelabel = "pict2" then
  122.         set caph = the height of cast "caption-pic2"
  123.         set the locv of sprite captionsprite = centerpoint - (caph/2)
  124.       end if
  125.     else
  126.       set the locv of sprite captionsprite = centerpoint - (caph/2)
  127.     end if  
  128.     
  129.     
  130.   else if gWorld = "Body" then
  131.     set the locv of sprite captionsprite = 112
  132.   end if
  133.   
  134.   -- if it exists then put it on the screen, getting rid of the cutting box
  135.   
  136.   if piccast > 0 then    
  137.     set the stretch of sprite picsprite = 0
  138.     set the castnum of sprite picsprite = piccast
  139.     set w = 1.0 * (the width of cast piccast) / 2
  140.     set h = 1.0 * (the height of cast piccast) / 2
  141.     
  142.     if gWorld = "design" then
  143.       if the width of cast piccast > the height of cast piccast then
  144.         -- wide picts  256,146
  145.         set the loch of sprite picsprite = 98 + w
  146.         set the locv of sprite picsprite = 131 + h
  147.         set the loch of sprite captionsprite = 493
  148.       else
  149.         -- tall pics  256,72
  150.         set the loch of sprite picsprite = 275 + w
  151.         set the locv of sprite picsprite = 480-h
  152.         set the loch of sprite captionsprite = 138
  153.       end if
  154.     else if gWorld = "power" then
  155.       
  156.       set the loch of sprite captionsprite = captionloch
  157.       if the width of cast piccast > the height of cast piccast then
  158.         -- wide picts  256,146
  159.         set the loch of sprite picsprite = 640 - w
  160.         set the locv of sprite picsprite = 146 + h
  161.       else
  162.         -- tall pics  256,72
  163.         set the loch of sprite picsprite = 256 + w
  164.         set the locv of sprite picsprite = 72 + h
  165.       end if
  166.     else if gWorld = "discover" then
  167.       
  168.       set the loch of sprite captionsprite = captionloch
  169.       if the width of cast piccast > the height of cast piccast then
  170.         -- wide picts  256,146
  171.         set the loch of sprite picsprite = 250 + w
  172.         -- set the locv of sprite picsprite = 146 + h
  173.         set the locv of sprite picsprite = 421 - h
  174.       else
  175.         -- tall pics  256,72
  176.         set the loch of sprite picsprite = 250 + w
  177.         --  set the locv of sprite picsprite = 72 + h
  178.         set the locv of sprite picsprite = 421 - h
  179.       end if
  180.     else if gWorld = "senses" then
  181.       
  182.       if the width of cast piccast > the height of cast piccast then
  183.         -- wide picts  191,56
  184.         set the loch of sprite picsprite = 191 + w
  185.         set the locv of sprite picsprite = 46 + h
  186.       else
  187.         -- tall pics  191,56
  188.         
  189.         set caph = the height of cast "caption-pic"
  190.         set the locv of sprite captionsprite = centerpoint - (caph/2)
  191.         
  192.         set the loch of sprite picsprite = 191 + w
  193.         set the locv of sprite picsprite = 45 + h
  194.       end if
  195.       
  196.       set the loch of sprite captionsprite = captionloch
  197.       
  198.     else if gWorld = "mind" then
  199.       
  200.       if piccastname = "96-3.6" then
  201.         -- special case for Jung
  202.         set the loch of sprite picsprite = 457
  203.         set the locv of sprite picsprite = 284
  204.         
  205.       else if piccastname = "96-3.6b" then
  206.         -- another special case for Jung
  207.         set the loch of sprite picsprite = 451
  208.         set the locv of sprite picsprite = 282
  209.         
  210.       else if (the width of cast piccast) > (the height of cast piccast) or ¼
  211.          (the width of cast piccast) = (the height of cast piccast) then
  212.         
  213.         -- wide picts  191,56
  214.         set the loch of sprite picsprite = 256 + w
  215.         set the locv of sprite picsprite = 96 + h
  216.       else
  217.         -- tall pics  191,56
  218.         
  219.         set caph = the height of cast "caption-pic"
  220.         set the locv of sprite captionsprite = centerpoint - (caph/2)
  221.         
  222.         set the loch of sprite picsprite = 348 + w
  223.         set the locv of sprite picsprite = 96 + h
  224.       end if
  225.       
  226.       set the loch of sprite captionsprite = captionloch
  227.     else if gWorld = "body" then
  228.       
  229.       if the width of cast piccast > the height of cast piccast then
  230.         -- wide picts  191,56
  231.         set the loch of sprite picsprite = 298 + w
  232.         set the locv of sprite picsprite = 68 + h
  233.       else
  234.         -- tall pics  191,56
  235.         
  236.         set the loch of sprite picsprite = 296 + w
  237.         set the locv of sprite picsprite = 68 + h
  238.       end if
  239.       
  240.       set the loch of sprite captionsprite = captionloch
  241.     end if
  242.   else
  243.     set the loch of sprite captionsprite = captionloch
  244.   end if
  245.   
  246.   updatestage
  247.   
  248.   if piccastname = "136-2.2" then 
  249.     go to frame "136-2.2"
  250.     set the visible of sprite 20 = 1    
  251.   else if piccastname = "136-2.3" then 
  252.     go to frame "136-2.3"
  253.     set the visible of sprite 20 = 1    
  254.   else if piccastname = "96-3.6" then   
  255.     go to frame "jung"
  256.   end if
  257.   
  258. end
  259. ---------------------------------------------------------------------------------------------
  260. on GoSoundArticle
  261.   global gChapters, gTitles, gArticles, gDates, gCaptions, gCurCutting
  262.   global gCurChap, gCurArticle, gName, mytext, gArticlePage, gFullCuttings
  263.   global gFormattedText, gTextPages, gMaxLines, gCurIndex, gWorld, gSeenMaps
  264.   global gPaperLoch, gMakerName, gHeadlocH, gNameLoch, gNameLocv
  265.   global gMakerNum, gQTpath, gSoundPath, gNuggetTime, gNuggetDelay, gNameCastnum
  266.   
  267.   set picsprite = 9  -- the sprite the pict appears on
  268.   set cuttingsprite = 6
  269.   set titlesprite = 8
  270.   set papersprite = 11
  271.   set datesprite = 12
  272.   set captionsprite = 7
  273.   set forwardbutton = 20
  274.   set backbutton = 19
  275.   set headsprite = 10  
  276.   set namesprite = 4
  277.   set headloch = gHeadloch  -- the loch of the headshot sprite
  278.   
  279.   
  280.   -- SOUND
  281.   set the loch of sprite headsprite = headloch
  282.   puppetsprite forwardbutton,0
  283.   puppetsprite backbutton,0
  284.   puppetsprite papersprite,0
  285.   set the text of field "caption-qt" = " "
  286.   
  287.   unpuppet "4,10"  
  288.   
  289.   -- get the sound    
  290.   set fname = gSoundpath & "S" & gMakerNum & ".AIF"
  291.   puppetsprite 16,1
  292.   set the loch of sprite 16 = 1000
  293.   sound playFile 1, fname
  294.   
  295.   go to frame "QT"
  296.   
  297.   if gWorld = "Senses" or gWorld = "Design" then
  298.     set the loch of sprite namesprite = gNameLoch
  299.     set the locv of sprite namesprite = gNameLocv
  300.   end if
  301.   
  302.   if gWorld = "Senses"  or gWorld = "Design" then  
  303.     puppetsprite 25,1
  304.     puppetsprite 26,1
  305.     puppetsprite 27,1 
  306.     puppetsprite 28,1
  307.   end if
  308.   
  309.   
  310.   
  311.   puppetsprite captionsprite,1
  312.   set captionloch = the loch of sprite captionsprite
  313.   set the castnum of sprite captionsprite = the number of cast "caption-qt"
  314.   
  315.   set the loch of sprite captionsprite = 1000
  316.   set the loch of sprite picsprite = 1000
  317.   updatestage
  318.   
  319.   set tmpcap = GetCaption()
  320.   set the text of field "caption-qt" =  tmpcap
  321.   
  322.   if gWorld <> "Senses" then
  323.     set the textheight of field "caption-qt" = 18  -- leading
  324.   else
  325.     set the textheight of field "caption-qt" = 25
  326.   end if
  327.   
  328.   -- adjust the height of the Sound caption, to center it
  329.   if gWorld = "mind" then
  330.     set centerpoint = 200
  331.   else
  332.     set centerpoint = 280
  333.   end if
  334.   set caph = the height of cast "caption-qt"
  335.   
  336.   if gWorld <> "Senses" then -- in design the caption does not need vertical centering
  337.     set the locv of sprite captionsprite = centerpoint - (caph/2)
  338.   end if
  339.   set the loch of sprite captionsprite = captionloch
  340.   
  341.   
  342. end
  343.  
  344. ---------------------------------------------------------------------------------------------
  345. on GoAnimArticle
  346.   global gChapters, gTitles, gArticles, gDates, gCaptions, gCurCutting
  347.   global gCurChap, gCurArticle, gName, mytext, gArticlePage, gFullCuttings
  348.   global gFormattedText, gTextPages, gMaxLines, gCurIndex, gWorld, gSeenMaps
  349.   global gPaperLoch, gMakerName, gHeadlocH, gNameLoch, gNameLocv, gQTAnimpath
  350.   global gMakerNum, gQTpath, gSoundPath, gNuggetTime, gNuggetDelay, gNameCastnum
  351.   
  352.   set picsprite = 9  -- the sprite the pict appears on
  353.   set cuttingsprite = 6
  354.   set titlesprite = 8
  355.   set papersprite = 11
  356.   set datesprite = 12
  357.   set captionsprite = 7
  358.   set forwardbutton = 20
  359.   set backbutton = 19
  360.   set headsprite = 10  
  361.   set namesprite = 4
  362.   set headloch = gHeadloch  -- the loch of the headshot sprite
  363.   
  364.   
  365.   if not marker(gMakernum & ".anim") then exit
  366.   
  367.   set the loch of sprite headsprite = headloch
  368.   puppetsprite forwardbutton,0
  369.   puppetsprite backbutton,0
  370.   puppetsprite papersprite,0
  371.   set the text of field "caption-qt" = " "
  372.   
  373.   unpuppet "4,10"  
  374.   
  375.   --  get the QTmovie
  376.   --  set cnum = the number of cast "QTcast"
  377.   --  set fname = gQTAnimpath & "A" & gMakerNum & "A" & gCurChap & gCurArticle & ".MOV"
  378.   --  put fname
  379.   --  set the filename of cast "QTcast" = fname
  380.   --  set the name of cast cnum = "QTcast"
  381.   
  382.   go to frame gMakernum & ".anim"
  383.   CleanMem
  384.   
  385.   if gWorld = "Senses" or gWorld = "Design" then
  386.     set the loch of sprite namesprite = gNameLoch
  387.     set the locv of sprite namesprite = gNameLocv
  388.   end if
  389.   
  390.   if gWorld = "Senses" or gWorld = "Design" then  
  391.     puppetsprite 25,1
  392.     puppetsprite 26,1
  393.     puppetsprite 27,1 
  394.     puppetsprite 28,1
  395.   end if
  396.   
  397.   
  398.   
  399.   puppetsprite captionsprite,1
  400.   set captionloch = the loch of sprite captionsprite
  401.   set the castnum of sprite captionsprite = the number of cast "caption-qt"
  402.   
  403.   set the loch of sprite captionsprite = 1000
  404.   set the loch of sprite picsprite = 1000
  405.   updatestage
  406.   
  407.   set tmpcap = GetCaption()  
  408.   set the text of field "caption-qt" =  tmpcap
  409.   
  410.   if gWorld <> "Senses" then
  411.     set the textheight of field "caption-qt" = 18  -- leading
  412.   else
  413.     set the textheight of field "caption-qt" = 25
  414.   end if
  415.   
  416.   -- bring up the QT movie
  417.   
  418.   -- adjust the height of the QT caption, to center it
  419.   if gWorld = "Discover" then
  420.     set centerpoint = 250  
  421.   else
  422.     set centerpoint = 280
  423.   end if
  424.   set caph = the height of cast "caption-qt"
  425.   
  426.   -- in design the caption does not need vertical centering
  427.   if gWorld <> "Senses" and gWorld <> "Body" then 
  428.     set the locv of sprite captionsprite = centerpoint - (caph/2)
  429.   else if gWorld = "Body" then
  430.     set the locv of sprite captionsprite = 112  
  431.   end if
  432.   set the loch of sprite captionsprite = captionloch
  433.   
  434.   -- start the QT
  435.   set the movierate of sprite 3 = 1
  436.   
  437.   -- the play/stop button sprite
  438.   puppetsprite 11,1 
  439.   
  440. end
  441.  
  442.  
  443.